<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta content="width=device-width,user-scalable=no"name="viewport">
<title>修改手机号</title>
<link rel="stylesheet" type="text/css" href="<?php echo C('WEB_URL');?>Public/business/style/base.css" />
<link rel="stylesheet" type="text/css" href="<?php echo C('WEB_URL');?>Public/business/style/style.css" />
<link rel="stylesheet" type="text/css" href="<?php echo C('WEB_URL');?>Public/business/style/bootstrap.min.css" />
<script type="text/javascript" charset="UTF-8" src="<?php echo C('WEB_URL');?>Public/business/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript" charset="UTF-8" src="<?php echo C('WEB_URL');?>Public/business/js/bootstrap.min.js"></script>
<script type="text/javascript" charset="UTF-8" src="<?php echo C('WEB_URL');?>Public/business/js/script.js"></script>
</head>
<body>
<div id="box">
 <div class="navbar navbar-default navbar-fixed-top">
  <header>
   <h1><a href="person1.html"><span class="glyphicon glyphicon-menu-left"></span></a></h1>
   <p class="title">修改手机号</p>
  </header>
 </div><!--navbar-fixed-top-->
 <div class="amendTel">
  <form action="edittel" method="get" name="form">
  <div class="amTel">
   <label>手机：</label>
   <input type="tel" placeholder="请输入新的手机号码" name="tel" id='tel' />
   <input type="button" id="btn" value="发送验证码" onclick="settime(this)" />
  </div>
  <div class="amTel">
   <label>验证码：</label>
   <input type="number" placeholder="请输入验证码" name="yz" />
  </div>
  <div class="amTel" style="border:0">
    <input type="submit" value="保存" class="saves" onClick="return yanzheng()" name="submit" id="but" />
   </div><!--/amTel-->
  </form>
 </div><!--amendTel-->
 <div class="navbar navbar-default navbar-fixed-bottom">
   <footer>
    <dl>
     <dt><a href="index.html"><img src="<?php echo C('WEB_URL');?>Public/business/images/home.png" /></a></dt>
     <dd><a href="index.html" class="current">首页</a></dd>
    </dl>
    <dl>
     <dt><a href="pullrefresh_sub.html"><img src="<?php echo C('WEB_URL');?>Public/business/images/deal_07.jpg" /></a></dt>
     <dd><a href="pullrefresh_sub.html">员工管理</a></dd>
    </dl>
    <dl>
     <dt><a href="manage.html"><img src="<?php echo C('WEB_URL');?>Public/business/images/deal_09.jpg" /></a></dt>
     <dd><a href="manage.html">会员管理</a></dd>
    </dl>
   </footer>
  </div><!--/navbar-->
</div><!--box-->
<!--js验证弹出确认框-->
<div class="clickBox" style="display: none;">
 <div class="clickOne">
  <p></p>
  <h4><a href="javascript:;" class="close_a">确认</a></h4>
 </div>
</div>
<!--js验证弹出确认框End-->
<!--会员卡保存成功弹出页面 -->
 <div id="popup"><a href="person1.html" class="a_click">
  <div id="click_div">
   <div id="dialog">
	<h3><img src="<?php echo C('WEB_URL');?>Public/business/images/paysuc_03.jpg" /></h3>
	<h5>恭喜您，保存成功！</h5>
  </div>
 </div></a>
</div>
 <!--会员卡保存成功弹出页面 End-->
<script type="text/javascript">
//微信判断header是否显示
if(isWeiXin()){ 
//alert("====");
$(".title").hide();
} 
else{
//alert("+++++");
}

$('#btn').click(function(){
	var phone=$('#tel').val();
	var type=1;

	$.ajax({
		  type:'GET',
		  url:"<?php echo C('WEB_URL');?>home/Api/sendcode",
		  dataType: "json",
		  data:{"phone":phone,"type":type	},
		  success:function(data){
			 
			  }
		  		
})


})

function yanzheng()
	{
		var tel=form.tel.value;
		if(tel.length==0)
		{
			str = "请输入正确的手机号！";
			form.tel.focus();
			opendiv(str);
			return false;
		}		
		var yz=form.yz.value;
		if(yz.length==0)
		{
			str = "请填写正确的验证码！";
			opendiv(str);
			form.yz.focus();
			return false;
		}
		
		
		
		return true;
	}
	
	
	
	function opendiv(str){
		var strs = str;
		var clickname = $(".clickBox");
		clickname.show();
		$(".clickOne p").html(strs);
	}
	$(".close_a").click(function(){
		var clickname = $(".clickBox");
		clickname.hide();
	});
</script>
</body>
</html>